<!DOCTYPE html>
<html lang='zh-CN'>
<head>
    <title>首页</title>
    <%- include header.html %>
</head>
<body>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
    <div class="container">
        <div class="navbar-header">
            <button class="navbar-toggle" type="button" data-toggle="collapse" data-target=".bs-navbar-collapse">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a href="/" class="navbar-brand">MySelf</a>
        </div>

        <nav class="collapse navbar-collapse bs-navbar-collapse" role="navigation">
            <ul class="nav navbar-nav">
                <li>
                    <a href="/">首页</a>
                </li>
                <li class="active">
                    <a href="/life">生活</a>
                </li>
                <li>
                    <a href="/travel">旅行</a>
                </li>
                <li>
                    <a href="/work">工作</a>
                </li>
            </ul>
            <ul class="nav navbar-nav navbar-right">
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown"><%=locals.user.username%> <b
                            class="caret"></b></a>
                    <ul class="dropdown-menu">
                        <li><a href="#"><i class="glyphicon glyphicon-user"></i> 个人资料</a></li>
                        <li class="divider"></li>
                        <li><a href="#"><i class="glyphicon glyphicon-lock"></i> 锁屏</a></li>
                        <li><a href="/logout"><i class="glyphicon glyphicon-off"></i> 注销</a></li>
                    </ul>
                </li>
            </ul>
        </nav>
    </div>
</div>


<div class="container">
    <div class="col-md-9">
        <% artides.forEach(function(item){%>
        <div class="panel panel-default">
            <div class="page-header">
                <h3><%= item.title%></h3>
            </div>
            <div class="panel-body col-md-12 content">
                <%= item.content%>
            </div>
        </div>
        <%})%>
    </div>
    <div class="col-md-3">
        <div class="form-group col-md-12">
            <div class="input-group">
                <input type="search" name="" class="form-control" placeholder="搜索标签">
                <span class="input-group-btn">
                    <button class="btn btn-default" type="button">Go!</button>
                </span>
            </div>
        </div>

        <div class="form-group col-md-12">
            <span class="label label-primary">最新发表</span>
            <ul class="list-group">
                <li class="list-group-item">Cras justo odio</li>
                <li class="list-group-item">Dapibus ac facilisis in</li>
                <li class="list-group-item">Morbi leo risus</li>
                <li class="list-group-item">Porta ac consectetur ac</li>
                <li class="list-group-item">Vestibulum at eros</li>
            </ul>
        </div>

        <div class="form-group col-md-12">
            <span class="label label-success">最新评论</span>
            <ul class="list-group">
                <li class="list-group-item">Cras justo odio</li>
                <li class="list-group-item">Dapibus ac facilisis in</li>
                <li class="list-group-item">Morbi leo risus</li>
                <li class="list-group-item">Porta ac consectetur ac</li>
                <li class="list-group-item">Vestibulum at eros</li>
            </ul>
        </div>
    </div>
</div>
<script src="/static/javascripts/jquery.min.js"></script>
<script src="/static/javascripts/bootstrap.min.js"></script>
<script type="text/javascript">
    $(".content").each(function(i,r){
        this.innerHTML=$(this).text();
    });
</script>
</body>
</html>